package com.hmall.interceptors;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class MyFeignInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        log.info("[feign拦截器正在设置请求头]");
        requestTemplate.header("authorization", "2");
        log.info("[feign拦截器设置请求头] authorization: {}", "2");
    }
}
